﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using VisaCRM.Modules.Admin.ViewModels.Helper;
using VisaCRM.Modules.Admin.Views;

namespace VisaCRM.Modules.Admin.ViewModels
{
    public class ManageAdminViewModel
    {
        public ICommand ManageIndustryCommand { get; private set; }
        public ICommand ManageCountryCommand { get; private set; }
        public ICommand ManageWhereHearCommand { get; private set; }
        public ICommand ManageProductTypesCommand { get; private set; }
        public ICommand ManageTitleCommand { get; private set; }
        public ICommand ManageQualificationCommand { get; private set; }
        public ICommand ManageConsultantCommand { get; private set; }

        ///summary
        ///initialises a new instance of IndustryViewmodel class
        ///summary
        public ManageAdminViewModel()
        {
            this.ManageIndustryCommand = new DelegateCommand((o) => this.ManageIndustry());
            this.ManageCountryCommand = new DelegateCommand((o) => this.ManageCountry());
            this.ManageWhereHearCommand = new DelegateCommand((o) => this.ManageWhereHear());
            this.ManageProductTypesCommand = new DelegateCommand((o) => this.ManageProductTypes());
            this.ManageTitleCommand = new DelegateCommand((o) => this.ManageTitle());
            this.ManageQualificationCommand = new DelegateCommand((o) => this.ManageQualification());
            this.ManageConsultantCommand = new DelegateCommand((o) => this.ManageConsultant());
        }

        private void ManageConsultant()
        {
            ConsultantViewModel vm = new ConsultantViewModel(null);
            ConsultantView mainWindow = new ConsultantView { DataContext = vm };
            mainWindow.Show(); 
        }

        private void ManageQualification()
        {
            QualificationViewModel vm = new QualificationViewModel(null);
            QualificationView mainWindow = new QualificationView { DataContext = vm };
            mainWindow.Show(); 
        }

        private void ManageTitle()
        {
            TitleViewModel vm = new TitleViewModel(null);
            TitleView mainWindow = new TitleView { DataContext = vm };
            mainWindow.Show(); 
        }

        private void ManageProductTypes()
        {
            ProductTypesViewModel vm = new ProductTypesViewModel(null);
            ProductTypesView mainWindow = new ProductTypesView { DataContext = vm };
            mainWindow.Show(); 
        }

        private void ManageWhereHear()
        {
            WhereHearViewModel vm = new WhereHearViewModel(null);
            WhereHearView mainWindow = new WhereHearView { DataContext = vm };
            mainWindow.Show(); 
        }

        private void ManageIndustry()
        {
            IndustryViewModel vm = new IndustryViewModel(null);
            IndustryView mainWindow = new IndustryView { DataContext = vm };
            mainWindow.Show();
        }

        private void ManageCountry()
        {
            CountryViewModel vm = new CountryViewModel(null);
            CountryView mainWindow = new CountryView { DataContext = vm };
            mainWindow.Show();
        }
    }
}
